<% content_for :title do %>Le Blog<% end %>

<% @posts.each do |post| %>
  <article>
    <header>
      <h1><%=h post.title %></h1>
    </header>
    <section>
      <p><%=h truncate(post.body, :length => 50) %></p>
    </section>
    <footer>
      <%= link_to "Lire l'article", post, :class => "readmore" %>
      <time datetime="<%=h post.created_at %>" pubdate ><%=h post.created_at %></time>
    </footer>
  </article>
<% end %>
